//
// Created on 2024/2/23.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#include "native_manager.h"
#include "napi/render/plugin_render.h"


native_manager *native_manager::instance_ = nullptr;
TouchEventHandler *TouchEventHandler::instance = nullptr;
native_manager::native_manager() 
{
    //TODO 初始化
    instance=this;
}

native_manager *native_manager::GetInstance() {
    if (instance_ == nullptr) {
        instance_ = new native_manager();
    }
    return instance_;
}

void native_manager::onSurfaceCreated(int width, int height, int orientation) {
    OHOS_LOGD("native_manager::onSurfaceCreated");
    // TODO 待实现
}
void native_manager::onDrawFrame() {
    // OHOS_LOGD("native_manager::onDrawFrame");
    //  TODO 待实现
}

void native_manager::Pause() {
    OHOS_LOGD("native_manager::Pause");
    // TODO 待实现
}

void native_manager::Resume() {
    OHOS_LOGD("native_manager::Resume");
    // TODO 待实现
}

void native_manager::onSurfaceChanged(int width, int height, int orientation){
    OHOS_LOGD("native_manager::onSurfaceChanged");
}

void native_manager::onSurfaceDestroyed() { 
    OHOS_LOGD("native_manager::onSurfaceDestroyed");
    // TODO 待实现
}

void native_manager::dispatchTouchEvent(TouchTracker *event){
    OHOS_LOGD("native_manager::dispatchTouchEvent");
    // TODO 待实现
}

void native_manager::dispatchTabEvent(TapTracker *event){
    OHOS_LOGD("native_manager::dispatchTabEvent");
    // TODO 待实现
}
